<template>
<van-swipe class="my-swipe" :autoplay="3000" indicator-color="white">
  <van-swipe-item v-for="item in list"
  :key="item.imgSrc">
  <img :src="item.imgSrc" alt=""></van-swipe-item>
</van-swipe>
</template>

<script setup lang="ts">
import { ref } from '@vue/reactivity';
import axios from 'axios';

interface ISwipeImg{
    link:string
    imgSrc:string
}
const list = ref<ISwipeImg[]>([])

axios({
    url:'/swiperList',
    method:'get'
}).then(res => {
    list.value = res.data.result
    
})
</script>

<style lang='less' scoped>
 .my-swipe 
 .van-swipe-item {
    color: #fff;
    font-size: 20px;
    text-align: center;
    background-color: #39a9ed;
    img{
        width: 100%;
        height: 100%;
    }
  }
</style>